home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-05-21 | 1.9 KB | 57 lines |
- # Hey Emacs, this Makefile is in -*- text -*- mode!
- #
- # Makefile for Bash.
- # If your cpp doesn't like -P, just get rid of it (the -P, not cpp).
- # If you wish to use Gcc, then just type "make CC=gcc".
- # If you wish to use GNU's Make, then change the MAKE define.
- # If you don't like the destination, then change DESTDIR. (This only
- # matters if you are typing `make install'.)
- # The file that you most likely want to look at is cpp-Makefile.
- #
- # If you haven't read README, now might be a good time.
-
- DESTDIR = /usr/gnu/bin
- MAKE = make
- SHELL= /bin/sh
- #CPP_DEFINES = -DHAVE_GCC -DHAVE_FIXED_INCLUDES -DHAVE_BISON
-
- CPP = /lib/cpp `./cppmagic.sh` -P
- #CPP = $(CC) -E
-
- CPPFLAGS = $(SYSTEM) $(CPP_DEFINES) -DM_DESTDIR=$(DESTDIR)
- CPP_ARGS = -DCPP_CC=$(CC)
-
- # Here is a command which compresses runs of multiple blank lines to a
- # single blank line. "cat -s" works for BSD systems, but not for USG
- # systems. You can use an awk script if you like.
- #SQUASH_BLANKS = cat -s
- #
- SQUASH_BLANKS = awk '\''BEGIN { newlines=0 } \
- { if (length ($$0) == 0) newlines = 1; \
- else { if (newlines) { printf "\n"; newlines = 0; } \
- print $$0; }}'\'
-
- all: bash-Makefile
- $(MAKE) $(MFLAGS) $(MAKEARGS) -f bash-Makefile
-
- bash-Makefile: cpp-Makefile Makefile machines.h sysdefs.h config.h
- cp cpp-Makefile tmp-Makefile.c
- @/bin/sh -c 'echo $(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c \| $(SQUASH_BLANKS) \> bash-Makefile'
- @/bin/sh -c '$(CPP) $(CPPFLAGS) $(CPP_ARGS) tmp-Makefile.c | $(SQUASH_BLANKS) >bash-Makefile'
- rm -f tmp-Makefile.c
-
- sysdefs.h: makeargs.sh
- ./makeargs.sh
-
- # Subsequent lines contain targets that are correctly handled by an
- # existing bash-Makefile.
-
- install newversion mailable distribution architecture: bash-Makefile
- $(MAKE) $(MAKEARGS) -f bash-Makefile $@
-
- bash.tar.Z tags documentation clone clean: bash-Makefile directory-frob
- $(MAKE) $(MAKEARGS) -f bash-Makefile $@
-
- directory-frob:
-
-